package com.jcgyl.export.mq;

import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.jcgyl.export.model.SystemConstants;

@Component
public class MessageSender {

	@Autowired
	private AmqpTemplate rabbitTemplate;

	public void send(String message) {
		this.rabbitTemplate.convertAndSend(SystemConstants.Order_Queue_Name, message);
	}

	public void send(String queue, String message) {
		this.rabbitTemplate.convertAndSend(queue, message);
	}
}
